/**
 * html导成word
 */
(function (){
	var option = {
		    angleAxis: {
		    },
		    radiusAxis: {
		        type: 'category',
		        data: ['周一', '周二', '周三', '周四'],
		        z: 10
		    },
		    polar: {
		    },
		    series: [{
		        type: 'bar',
		        data: [1, 2, 3, 4],
		        coordinateSystem: 'polar',
		        name: 'A',
		        stack: 'a'
		    }, {
		        type: 'bar',
		        data: [2, 4, 6, 8],
		        coordinateSystem: 'polar',
		        name: 'B',
		        stack: 'a'
		    }, {
		        type: 'bar',
		        data: [1, 2, 3, 4],
		        coordinateSystem: 'polar',
		        name: 'C',
		        stack: 'a'
		    }],
		    legend: {
		        show: true,
		        data: ['A', 'B', 'C']
		    }
		};
	var chart = echarts.init(document.getElementById("echarts"));
	chart.setOption(option);
   var chartbase64 = chart.getConnectedDataURL();
   $("#echarts").attr("data-base64",chartbase64.substring(chartbase64.indexOf(";base64,")+8));
   $("#wordTo").on("click",function(){
	    $.ajax({
	        type:"post",
	        url:"up",
	        data:{"data":$("#content").html(),
	        	"charts":chartbase64.substring(chartbase64.indexOf(";base64,")+8)},
	        success:function(data){
	        	window.location.href='to';
	        }
	    });
	});
})();


